<?php
// 添加mongodb数据库中
$mongo = include 'mongo.php';

$bulk = new MongoDB\Driver\BulkWrite;
$bulk->delete(['title'=>$_GET['title']], ['limit' => 1]);   // limit 为 1 时，删除第一条匹配数据


$result = $mongo->executeBulkWrite('php71.article', $bulk);

echo json_encode(['status'=>0,'msg'=>'删除成功'],JSON_UNESCAPED_UNICODE);